

declare var isEditorMode: boolean

function runningInEditorMode() {
    if (typeof isEditorMode !== 'undefined' && isEditorMode == true) {
        return true
    }
    else {
        return false;
    }
}


if (runningInEditorMode()) {
    core.registerSystem(new EditorInputListenerSystem())
    core.registerSystem(new GameEngineRenderSystem());
    core.registerSystem(new EditorApiSystem());
    core.registerSystem(new EditorEngineMouseListenerSystem())


}
else {
    core.registerSystem(new GameEnginePlayModeLifeCycleSystem());
    core.registerSystem(new GameEngineRenderSystem());
    core.registerSystem(new GameEngineMouseListenerSystem());

}


core.registerBehaviourClass(Transform);
core.registerBehaviourClass(TextRenderer);
core.registerBehaviourClass(RectRenderer);
core.registerBehaviourClass(ImageRenderer);
core.registerBehaviourClass(PeopleControl);
core.registerBehaviourClass(Colliderer);
core.registerBehaviourClass(Box);
core.registerBehaviourClass(Tag);
core.registerBehaviourClass(PlayerAnimation);


setTimeout(() => {
    core.start(() => {
        // core.changeScene("prefab/startScene.json")
        //  core.changeScene("data.json")
        core.changeScene(core.currentScene);
         
        
    })
}, 1000)

